import request from '@/utils/request'

// 查询存储物料基础信息列表
export function listMaterials(query) {
  return request({
    url: '/material-service/inventory/materials/list',
    method: 'get',
    params: query
  })
}

// 查询存储物料基础信息详细
export function getMaterials(materialId) {
  return request({
    url: '/material-service/inventory/materials/' + materialId,
    method: 'get'
  })
}

// 新增存储物料基础信息
export function addMaterials(data) {
  return request({
    url: '/material-service/inventory/materials',
    method: 'post',
    data: data
  })
}

// 修改存储物料基础信息
export function updateMaterials(data) {
  return request({
    url: '/material-service/inventory/materials',
    method: 'put',
    data: data
  })
}

// 删除存储物料基础信息
export function delMaterials(materialId) {
  return request({
    url: '/material-service/inventory/materials/' + materialId,
    method: 'delete'
  })
}
